home *** CD-ROM | disk | FTP | other *** search
- Path: mail2news.demon.co.uk!hpl3sn03.cern.ch
- From: Dan Pop <danpop@mail.cern.ch>
- Newsgroups: comp.sys.sun.admin,comp.sys.unix,comp.lang.c
- Subject: Re: Yet more GCC 2.7.2 problems (SunOS 4). Memmove is missing.
- Date: Sat, 27 Jan 1996 01:21:43 +0100
- Organization: CERN European Lab for Particle Physics
- Message-ID: <9601270021.AA09981@dxmint.cern.ch>
- References: <310959EB.41C6@llnl.gov>
- X-NNTP-Posting-Host: hpl3sn03.cern.ch
- X-Newsreader: NN version 6.5.0 #7 (NOV)
- X-Mail2News-Path: dxmint.cern.ch!hpl3sn03.cern.ch
-
- Sean Ahern <ahern@llnl.gov> writes:
-
- >Just to let you know what OS I'm on, uname -a gives me this:
- >SunOS spear.lln 4.1.3_U1 1 sun4c
- >
- >I've compiled and installed GCC 2.7.2 on this machine, but I've noticed that
- >I'm missing something important. The memmove call is missing, it seems. I get
- >unresolved references when I attempt to compile code that uses memmove.
- >
- > gcc -o foo foo.c -ldl
- > ld: Undefined symbol
- > _memmove
- >
- >Looking around the configuration for sun and the source code for gcc would lead
- >me to believe that memmove should be in the libgcc.a libraries, but I can't
- >seem to find it.
-
- Nope. It should be in the system's libc.a, but it isn't because the SunOS 4
- libraries aren't ANSI compliant. gcc is only a compiler, it relies on the
- system libraries for the standard C and Unix functions.
-
- >I also can't seem to find anything mentioning this on the Web
- >or in any FAQ.
-
- You haven't tried hard enough.
-
- >Does anyone know what I might be doing wrong here?
-
- Not reading the FAQ before posting. From the c.l.c FAQ:
-
- 13.24: I'm trying to port this A: Those routines are variously
- old program. Why do I obsolete; you should
- get "undefined external" instead:
- errors for:
-
- index? use strchr.
- rindex? use strrchr.
- bcopy? use memmove, after
- interchanging the first and
- second arguments (see also
- question 11.25).
- bcmp? use memcmp.
- bzero? use memset, with a second
- argument of 0.
-
- Contrariwise, if you're using an older system which is missing
- the functions in the second column, you may be able to implement
- them in terms of, or substitute, the functions in the first.
-
- Note the last paragraph!
-
- Dan
- --
- Dan Pop
- CERN, CN Division
- Email: danpop@mail.cern.ch
- Mail: CERN - PPE, Bat. 31 R-004, CH-1211 Geneve 23, Switzerland
-